Skip to content

feat(Storage): add support for Bucket IP filter configuration#9286

Open
salilg-eng wants to merge 3 commits into
googleapis:mainfrom
salilg-eng:feat/bucketip-filter
Open

feat(Storage): add support for Bucket IP filter configuration#9286
salilg-eng wants to merge 3 commits into
googleapis:mainfrom
salilg-eng:feat/bucketip-filter

Conversation

@salilg-eng

Copy link
Copy Markdown
Contributor

This PR adds support for Bucket IP Filters to the PHP Cloud Storage client library. This lets developers restrict bucket access to specific IP addresses or VPC networks, which is a big win for security.

Changes :

Schema: Updated storage-v1.json with the ipFilter definition (covering mode, public/VPC sources, and service agent access) so the REST client handles serialization correctly.
Documentation: Added the $ipFilter array structure to the docblocks for StorageClient::createBucket() and Bucket::update().
System Tests: Added comprehensive E2E verification in ManageBucketsTest.php under the @group bucket-ipfilter tag. This covers CRUD operations, invalid CIDR handling, and safely confirms 403 Forbidden denials for unauthorized access.
Unit Tests: Added extensive unit test coverage in StorageClientTest.php and BucketTest.php to ensure the new configuration passes perfectly through the client down to the underlying connections.

@salilg-eng salilg-eng requested review from a team as code owners June 22, 2026 09:54
@product-auto-label product-auto-label Bot added the api: storage Issues related to the Cloud Storage API. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant